package cn.wolfcode.crm.service.impl;


import cn.wolfcode.crm.domain.Car;
import cn.wolfcode.crm.domain.Payinfo;
import cn.wolfcode.crm.mapper.CarMapper;
import cn.wolfcode.crm.mapper.PayinfoMapper;
import cn.wolfcode.crm.query.PayinfoQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.ICarService;
import cn.wolfcode.crm.service.IPayinfoService;
import cn.wolfcode.crm.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class PayinfoServiceImpl implements IPayinfoService {

	@Autowired
	private PayinfoMapper payinfoMapper;



	public PageResult query(PayinfoQueryObject qo) {
		int count = payinfoMapper.queryForCount(qo);
		if (count == 0) {
			return new PageResult(count, Collections.EMPTY_LIST);
		}
		List<Payinfo> result = payinfoMapper.queryForList(qo);
		return new PageResult(count, result);
	}


}
